<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>员工</title>
    <%@include file="/static/js/common.jsp"%>
    <script src="/static/js/employee.js"></script>
    <script type="text/javascript" src="/static/plugins/form/jQueryForm.js"></script>
    <script>
        $(function () {
            /*异步提交表单*/
            $("#submitForm").ajaxForm(function (data) {
                if (data.success) {
                    $.messager.alert("温馨提示","上传成功","info");
                }else{
                    $.messager.alert("温馨提示",data.msg,"error");
                }
            });
            //给登录按钮绑定点击事件
            $("#subBtn").click(function () {
                $("#submitForm").submit();
            });
        });
    </script>
</head>
<body>
<table id="employee_dg"></table>
<div id="employee_tb">
    <a class="easyui-linkbutton" data-cmd="saveUser" data-options="iconCls:'icon-add',text:'新增'"></a>
    <a class="easyui-linkbutton" data-cmd="editUser" data-options="iconCls:'icon-edit',text:'编辑'"></a>
    <a id="btn_change" class="easyui-linkbutton" data-cmd="changeUser" data-options="iconCls:'icon-no',text:'离职'"></a>
    <a class="easyui-linkbutton" data-cmd="reloadwin" data-options="iconCls:'icon-reload',text:'刷新'"></a>
    用户名/真实姓名: <input class="easyui-validatebox" style="width: 85px" type="text" name="keyword"/>
    <a class="easyui-linkbutton" data-cmd="queryForKey"  data-options="iconCls:'icon-search',text:'查询'"></a>
    <br/>
    <a class="easyui-linkbutton" data-cmd="exportData" data-options="iconCls:'icon-redo'">导出</a>
    <form id="submitForm" action="/employee/importData.do" method="post" enctype="multipart/form-data">
        <input type="file" name="file">
        <input id="subBtn" type="button" value="上传">
    </form>
</div>
<div id="employee_dig">
    <form id="employee_form">
        <table align="center">
            <input type="hidden" name="id">
            <br>
            <br>

            <tr>
                <td>用户名称:</td>
                <td>
                    <input id="checkUsername" class="easyui-validatebox" type="text" name="username"/>

                </td>
                <tr> <td colspan="2"><span id="usernamecss" style="color: red"></span></td></tr>
            </tr>
            <tr id="password" >
                <td>密码:</td>
                <td>
                    <input  class="easyui-passwordbox" type="text" name="password"/>
                </td>
            </tr>

            <tr>
                <td>真实姓名:</td>
                <td>
                    <input class="easyui-validatebox" type="text" name="realname"/>
                </td>
            </tr>
            <tr>
                <td>联系方式:</td>
                <td>
                    <input class="easyui-validatebox" type="text" name="tel"/>
                </td>
            </tr>
            <tr>
                <td>邮箱:</td>
                <td>
                    <input class="easyui-validatebox" type="text" name="email"/>
                </td>
            </tr>
            <tr>
                <td>所属部门:</td>
                <td>
                    <input class="easyui-combobox" name="dept.id"
                           data-options="valueField:'id',textField:'name',url:'/department/selectAll.do',panelHeight:'auto'"/>

                </td>
            </tr>
            <tr>
                <td>入职时间:</td>
                <td>

                    <input name="hiretime" type="text" class="easyui-datebox"> </input>


                </td>
            </tr>
            <tr>
                <td>超级管理员:</td>
                <td>

                    <input type="checkbox" name="admin" value="true">


                </td>
            </tr>
            <tr>
                <td>角色：</td>
                <td>

                    <input id="role_combobox"  class="easyui-combobox" multiple="true"
                           data-options="valueField:'id', textField:'name',
                               url:'/role/selectAll.do', panelHeight:'auto'"/>
                </td>
            </tr>


        </table>

    </form>
</div>
<!--对话框底部工具栏-->
<div id="employee_dig_btn">
    <a class="easyui-linkbutton" data-cmd="submitForm" data-options="iconCls:'icon-save',text:'保存'"></a>
    <a class="easyui-linkbutton" data-cmd="closeWin" data-options="iconCls:'icon-cancel',text:'取消'"></a>
</div>

</body>
</html>
